package cn.springboot.osbulkparts.dao.warehouse;

import cn.springboot.osbulkparts.entity.TDeliverInfoEntity;
import cn.springboot.osbulkparts.entity.TOrderInfoEntity;
import cn.springboot.osbulkparts.entity.formbean.GoodsListEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TDeliverInfoDao {



    int updateByPrimaryKeySelective(TDeliverInfoEntity record);


    /**用于发货收货和删除的公共方法*/
    int deliverReceivingDelete(@Param("ids") String[] ids, @Param("updateUser") String updateUser, @Param("state") String state, @Param("isDelete") String isDelete);

    /**用于添加的接口方法*/
    int insertList(List<TDeliverInfoEntity> records);

    List<TDeliverInfoEntity> selectDeliverInfoList (TDeliverInfoEntity record);

    //根据合同号获得 提单号、装船日期、船期、应付款日期、实际付款日期
    List<TDeliverInfoEntity> getInitInfoByContractNo(TDeliverInfoEntity record);

    //根据物料code获取该物料号下的所有发货数量
    TDeliverInfoEntity findAmountByCode(@Param("materialCode") String materialCode,@Param("dataRoleAt") String dataRoleAt);

    //获取发货的汇总数据  20191104
    List<GoodsListEntity> findGoodsListSummary(GoodsListEntity goodsListEntity);
}